from easydict import EasyDict as edict


__C                             = edict()
# Consumers can get config by: from config import cfg

cfg                             = __C

# YOLO options
__C.YOLO                        = edict()

#设置类名
__C.YOLO.CLASSES                = "./data/classes/cast.names"
#设置anchor box
__C.YOLO.ANCHORS                = "./data/anchors/cast_anchors.txt"
#滑动平均衰减率
__C.YOLO.MOVING_AVE_DECAY       = 0.9995
#图像缩小的比例
__C.YOLO.STRIDES                = [8, 16, 32]
#在每一种缩放比例下每个grid cell的anchor boxes的数量
__C.YOLO.ANCHOR_PER_SCALE       = 3
#IOU的阈值
__C.YOLO.IOU_LOSS_THRESH        = 0.5
#上采样的方法
__C.YOLO.UPSAMPLE_METHOD        = "resize"
#初始权重
# __C.YOLO.ORIGINAL_WEIGHT        = "./checkpoint/yolov3_cast.ckpt"
#demo权重
# __C.YOLO.DEMO_WEIGHT            = "./checkpoint/yolov3_cast_demo.ckpt"


# Train options
__C.TRAIN                       = edict()
#训练标签
__C.TRAIN.ANNOT_PATH            = "./data/dataset/cast_train.txt"
#每次喂入的图像个数
__C.TRAIN.BATCH_SIZE            = 1
#设置输入图像的大小
__C.TRAIN.INPUT_SIZE            = [352,416,832,1024,1536,2048,2560,3072]
#是否使用图像增强
__C.TRAIN.DATA_AUG              = True
#初始化学习率
__C.TRAIN.LEARN_RATE_INIT       = 1e-4

__C.TRAIN.LEARN_RATE_END        = 1e-6
__C.TRAIN.WARMUP_EPOCHS         = 2
#第一次迭代次数
__C.TRAIN.FISRT_STAGE_EPOCHS    = 20
#第二次迭代次数
__C.TRAIN.SECOND_STAGE_EPOCHS   = 20
#训练初始化权重
__C.TRAIN.INITIAL_WEIGHT        = ""



# TEST options
__C.TEST                        = edict()

__C.TEST.ANNOT_PATH             = "./data/dataset/cast_test.txt"
__C.TEST.BATCH_SIZE             = 2
__C.TEST.INPUT_SIZE             = 1024
__C.TEST.DATA_AUG               = False
__C.TEST.WRITE_IMAGE            = True
__C.TEST.WRITE_IMAGE_PATH       = "./data/detection/"
__C.TEST.WRITE_IMAGE_SHOW_LABEL = True
__C.TEST.WEIGHT_FILE            = ""
__C.TEST.SHOW_LABEL             = True
__C.TEST.SCORE_THRESHOLD        = 0.3
__C.TEST.IOU_THRESHOLD          = 0.45






